str = "helooworld"
#正向递增
for i in range(0,len(str)):
    print(i,str[i],end='\t\t')
print('\n------------------')

#反向递减
for i in range(-10,0):
    print(i, str[i], end='\t\t')
print('\n------------------')

#切片操作
s1 = str[0:5:2]
print(s1)
print(str[:5:1])
print(str[:5:])
print(str[0::1])
print(str[5::])

#更改步长
print(str[::2])